package com.mofeng.myshop.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mofeng.myshop.domain.po.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品信息
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_commodity")
@Schema(name = "Commodity对象", description = "商品信息")
public class Commodity extends BaseEntity {

    @Schema(description = "虚拟删除状态， 0 存在  1删除")
    @TableField("`delete`")
    private String delete;

    @Schema(description = "商品图片路径")
    private String image;

    @Schema(description = "小图标路径")
    private String iconImage;

    @Schema(description = "商品代码")
    private String code;

    @Schema(description = "商品基础价格")
    private Double basePrice;

    @Schema(description = "质量倍率,会用(质量数量-1)*此倍率，然后加在原价格上")
    private Double multiplierUp;

    @Schema(description = "等级倍率, 会用等级*此倍率，然后加在原价格上")
    private Double levelUp;

    @Schema(description = "等级上限 没有则空")
    private Integer levelTop;

    @Schema(description = "折扣，小数")
    private Double discount;

    @Schema(description = "商品当前价格")
    private Double price;

    @Schema(description = "商品类别ID")
    private Long commodityCategoryId;

    @Schema(description = "商城ID")
    private Long projectId;

    @Schema(description = "是否热点商品  0不是 1 是")
    private String hot;


    @TableField(exist = false)
    private CommodityCategory commodityCategory;

    @TableField(exist = false)
    private Project project;
}
